package com.song.feign.service;

import com.song.common.entity.R;
import com.song.debp.domain.Dept;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

/**
 * @author TonySong
 * @date 2024/4/27 0027
 * @time 16:35
 */
@FeignClient("dept-mp")
public interface DeptFeign {


    @GetMapping("/dept/")
    public R getDept();
    @GetMapping("/dept/{id}")
    public R getDeptById(@PathVariable("id") Long id);


    @PostMapping("/dept/")
    public R addDept(@RequestBody Dept dept);

    @PutMapping("/dept/")
    public R updateDept(@RequestBody Dept dept);

    @DeleteMapping("/dept/{id}")
    public R deleteDept(@PathVariable("id") Long id);
}
